package com.ruoyi.remark.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.remark.mapper.RemarkMapper;
import com.ruoyi.remark.domain.Remark;
import com.ruoyi.remark.service.IRemarkService;

/**
 * 评论Service业务层处理
 * 
 * @author King
 * @date 2024-07-04
 */
@Service
public class RemarkServiceImpl implements IRemarkService 
{
    @Autowired
    private RemarkMapper remarkMapper;

    /**
     * 查询评论
     * 
     * @param remarkId 评论主键
     * @return 评论
     */
    @Override
    public Remark selectRemarkByRemarkId(Long remarkId)
    {
        return remarkMapper.selectRemarkByRemarkId(remarkId);
    }

    /**
     * 查询评论列表
     * 
     * @param remark 评论
     * @return 评论
     */
    @Override
    public List<Remark> selectRemarkList(Remark remark)
    {
        return remarkMapper.selectRemarkList(remark);
    }

    /**
     * 新增评论
     * 
     * @param remark 评论
     * @return 结果
     */
    @Override
    public int insertRemark(Remark remark)
    {
        return remarkMapper.insertRemark(remark);
    }

    /**
     * 修改评论
     * 
     * @param remark 评论
     * @return 结果
     */
    @Override
    public int updateRemark(Remark remark)
    {
        return remarkMapper.updateRemark(remark);
    }

    /**
     * 批量删除评论
     * 
     * @param remarkIds 需要删除的评论主键
     * @return 结果
     */
    @Override
    public int deleteRemarkByRemarkIds(Long[] remarkIds)
    {
        return remarkMapper.deleteRemarkByRemarkIds(remarkIds);
    }

    /**
     * 删除评论信息
     * 
     * @param remarkId 评论主键
     * @return 结果
     */
    @Override
    public int deleteRemarkByRemarkId(Long remarkId)
    {
        return remarkMapper.deleteRemarkByRemarkId(remarkId);
    }
}
